﻿Imports DevComponents.DotNetBar.Controls
Imports LSW.Print

Public Class DataGridView
    Inherits DataGridViewX

    Public Sub New()
        MyBase.New()
        Dim mi As New ToolStripMenuItem("打印")
        AddHandler mi.Click, AddressOf mi_Click
        Dim ms As New ContextMenuStrip
        ms.Items.Add(mi)
        ContextMenuStrip = ms
    End Sub

    Public Sub Print()
        PrintDG.Print_DataGrid(Me)
    End Sub

    Private Sub mi_Click(ByVal sender As Object, ByVal e As EventArgs)
        Print()
    End Sub
End Class
